package com.yxc.mybatisplusdemo;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.logging.LoggerConfiguration;
import org.springframework.boot.logging.LoggingSystem;
import org.springframework.boot.logging.logback.LogbackLoggingSystem;

import java.util.List;

@Slf4j
@SpringBootApplication(
        exclude = {DataSourceAutoConfiguration.class}
)
public class MybatisplusDemoApplication {

    public static void main(String[] args) {
        SpringApplication.run(MybatisplusDemoApplication.class, args);
        log.info("info  info");
        log.debug("debug  debug");
        log.warn("warn  warn");
        log.error("error  error");
        LoggingSystem loggingSystem = new LogbackLoggingSystem(ClassLoader.getSystemClassLoader());
        List<LoggerConfiguration> loggerConfigurations = loggingSystem.getLoggerConfigurations();
        System.out.println(loggerConfigurations);
        // System.out.println(loggingSystem.getProperty("FILE_LOG_PATTERN"));
    }

}
